#pragma once
#include "LibWinUtilsDef.h"

BOOL IsVistaOrLater();
class LIBWINUTILS_API UWinService
{
public:
	static HRESULT IsServiceExists(LPCTSTR pszSrvName, BOOL &bExists);
	static HRESULT IsServiceEnabled(LPCTSTR szSvcName, BOOL &bEnabled);
	static HRESULT GetServiceStatus(LPCTSTR pszSrvName, SERVICE_STATUS &status);
	static BOOL DumpServiceInfo(LPCTSTR szSvcName);
	
	static HRESULT StartSvc(LPCTSTR lpServiceName);	
	static HRESULT StopSvc(LPCTSTR lpServiceName);
	static HRESULT EnableService(LPCTSTR szSvcName, BOOL fDisable);
	static HRESULT UpdateSvcDesc(LPCTSTR lpServiceName, LPCTSTR szDesc);
	static HRESULT InstallSvc(LPCTSTR lpServiceName, LPCTSTR lpDisplayName, DWORD dwServiceType, LPCTSTR lpBinaryPathName, LPCTSTR lpServiceStartName, LPCTSTR lpDependencies);
	static HRESULT RemoveSvc(LPCTSTR lpServiceName);
};
